<ul class="breadcrumb">
	<li><a href="/admin">Dashboard</a><span class="divider">&raquo;</span></li>
	<li><a href="/admin/users">Manager User</a><span class="divider">&raquo;</span></li>
	<li class="active">Add User</li>
</ul>

<div class="row-fluid">
	<div class="span12">
		<div class="nonboxy-widget">
			<div class="widget-head">
				<h5><i class="color-icons add_co"></i><?php echo isset($this->data[$als]['id']) ? 'Edit' : 'Add' ; ?> User</h5>
			</div>

			<?php echo $this->Session->flash(); ?>

			<div class="widget-content">
				<div class="widget-box">

					<?php echo $this->Form->create($als, array('class' => 'form-horizontal well', 'type' => 'file'));?>
						<fieldset>

							<!-- Full name -->
							<div class="control-group">
								<label class="control-label">Fullname</label>
								<div class="controls">
									<?php echo $this->Form->input('id', array('type' => 'hidden', 'value' => isset($this->data[$als]['id']) ? $this->data[$als]['id'] : ''));?>
									<?php echo $this->Form->input('fullname', array('div' => false, 'label' => false, 'placeholder' => 'Input fullname', 'class' => 'span4'));?>
								</div>
							</div>

							<!-- Username -->
							<div class="control-group">
								<label class="control-label">Username</label>
								<div class="controls">
									<?php echo $this->Form->input('username', array('div' => false, 'label' => false, 'placeholder' => 'Input username', 'class' => 'span4'));?>
								</div>
							</div>

							<!-- Password -->
							<div class="control-group">
								<label class="control-label">Password</label>
								<div class="controls">
									<?php echo $this->Form->input('oldpass', array('type' => 'hidden'));?>
									<?php echo $this->Form->input('password', array('div' => false, 'label' => false, 'placeholder' => 'Input password', 'class' => 'span4'));?>
								</div>
							</div>

							<!-- Email -->
							<div class="control-group">
								<label class="control-label">Email</label>
								<div class="controls">
									<?php echo $this->Form->input('email', array( 'div' => false, 'label' => false, 'placeholder' => 'Input Email', 'class' => 'span4'));?>
								</div>
							</div>

							<!-- Address -->
							<div class="control-group">
								<label class="control-label">Address</label>
								<div class="controls">
									<?php echo $this->Form->input('address', array( 'div' => false, 'label' => false, 'placeholder' => 'Input address', 'class' => 'span4'));?>
								</div>
							</div>

							<!-- Avatar -->
							<div class="control-group">
								<label class="control-label">Avatar</label>
								<div class="controls">
									<?php echo $this->Form->input('avatar', array( 'type' => 'file', 'div' => false, 'label' => false, 'class' => 'input-file'));?>
								</div> <br/>

								<?php if(!empty($this->data[$als]['avatar'])):?>
								<div class="controls">
									<?php echo $this->Form->input('oldavatar', array('type' => 'hidden', 'value' => $this->data[$als]['avatar']));?>
									<img src="<?php echo PUBLIC_THUMB_SHOW.$this->data[$als]['avatar']; ?>" style="width:200px;"/>
								</div>
								<?php endif;?>
							</div>

							<!-- Role -->
							<div class="control-group">
								<label class="control-label">Role</label>
								<div class="controls">
									<?php echo $this->Form->input('role', array('div' => false, 'label' => false, 'options' => $roles, 'class' => 'span2'));?>
								</div>
							</div>

							<!-- Company -->
							<div class="control-group">
								<label class="control-label">Company</label>
								<div class="controls">
									<?php echo $this->Form->input('company_id', array( 'label' => false, 'multiple' => 'checkbox',  'options' => $companies  ) ); ?>
								</div>
							</div>

						</fieldset>
						<div class="form-actions">
							<button class="btn btn-primary" type="submit">Save</button>
							<a href="/admin/users" class="btn">Cancel</a>
						</div>
					<?php echo $this->Form->end( ); ?>
				</div>
			</div>

		</div>
	</div>
</div>

<!--================================-->
<script>

$(document).ready(function(){

});




</script>